<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <title>发布考试通知</title>
    <link rel="stylesheet" type="text/css" href="${s.base}/lib/layui/css/layui.css"/>
    <link rel="stylesheet" type="text/css" href="${s.base}/css/base/index.css"/>
    <link rel="stylesheet" type="text/css" href="${s.base}/css/base/theme/theme.css"/>
</head>
<style type="text/css">

</style>
<body>
<div class="wrap-container clearfix">
    <div class="column-content-detail">
        <form class="layui-form" action="">
            <div class="tab-step-ctn mart20">
                <div class="tab-step-line ">
                    <span class="circle">1</span>
                    <div class="tab-step-name">基础信息填写</div>
                    <i class="iconfont">&#xe688;</i>
                </div>
                <div class="tab-step-line">
                    <span class="circle">2</span>
                    <div class="tab-step-name">添加考生</div>
                    <i class="iconfont">&#xe688;</i>
                </div>
                <div class="tab-step-line">
                    <span class="circle">3</span>
                    <div class="tab-step-name">考场分配</div>
                    <i class="iconfont">&#xe688;</i>
                </div>
                <div class="tab-step-line ">
                    <span class="circle">4</span>
                    <div class="tab-step-name">监、巡考老师设置</div>
                    <i class="iconfont">&#xe688;</i>
                </div>
                <div class="tab-step-line checked">
                    <span class="circle">5</span>
                    <div class="tab-step-name">发布考试通知</div>
                    <i class="iconfont">&#xe688;</i>
                </div>
            </div>
            <div class="tab-menu-nav clearfix">
                <ul>
                    <li class="checked" data-id="jktot">学生分配情况</li>
                    <li data-id="kstot">老师分配情况</li>
                </ul>
            </div>
            <div id="jktot" style="display:block">
                <div class="search-cont clearfix" id="tool1">
                    <div class="operation-btn-cont">
                        <div class="operright cyt-retract-close hideMenu"> 收起筛选<i class="iconfont">&#xe658;</i></div>
                        <div class="operright cyt-retract-open showMenu" style="display: none;"> 展开筛选<i class="iconfont">&#xe936;</i></div>
                        <!--button开始-->
                        <button class="layui-btn layui-btn-normal layui-btn-mid" type="button" id="addstuBtn"><i class="iconfont marr5">&#xe614;</i>导出</button>
                        <!--button结束-->
                        <div class="triangle-bottom"></div>
                        <div class="triangle-top"></div>
                    </div>
                    <div class="search-details">
                        <div class="layui-form-item marb5">
                            <!--search开始-->
                            <div class="layui-inline">
                                <label class="layui-form-label">姓名：</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="name" id="name" placeholder="请输入姓名" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-inline">
                                <label class="layui-form-label">学号：</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="userNumber" id="userNumber" placeholder="请输入学号" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-inline">
                                <label class="layui-form-label">考场座位号：</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="stSeatNum" id="stSeatNum" placeholder="请输入考场座位号" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <!--search结束-->
                            <div class="layui-inline marl8">
                                <button class="layui-btn layui-btn-normal" type="button" lay-submit="" lay-filter="seacherBtn" id="stuSearch">搜索</button>
                                <button class="layui-btn layui-btn-normal" type="reset" id="stureset">重置</button>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form" id="table-list">
                    <table id="entityList" lay-filter="entityList" class="cy-list-table"></table>
                </div>
            </div>
            <div id="kstot" style="display:none">
                <div class="search-cont clearfix" id="tool">
                    <div class="operation-btn-cont">
                        <div class="operright cyt-retract-close hideMenu"> 收起筛选<i class="iconfont">&#xe658;</i></div>
                        <div class="operright cyt-retract-open showMenu" style="display: none;"> 展开筛选<i class="iconfont">&#xe936;</i></div>
                        <!--button开始-->
                        <button class="layui-btn layui-btn-normal layui-btn-mid" type="button" id="addteaBtn"><i class="iconfont marr5">&#xe614;</i>导出</button>
                        <!--button结束-->
                        <div class="triangle-bottom"></div>
                        <div class="triangle-top"></div>
                    </div>
                    <div class="search-details">
                        <div class="layui-form-item marb5">
                            <!--search开始-->
                            <div class="layui-inline">
                                <label class="layui-form-label">监考老师：</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="jkNames" id="jkNames"  placeholder="请输入监考老师" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-inline">
                                <label class="layui-form-label">巡考老师：</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="xkNames" id="xkNames" placeholder="请输入巡考老师" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <!--search结束-->
                            <div class="layui-inline marl8">
                                <button class="layui-btn layui-btn-normal" type="button" lay-submit="" lay-filter="seacherBtn" id="teaSearch" >搜索</button>
                                <button class="layui-btn layui-btn-normal" type="reset" id="teareset">重置</button>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form" id="table-listtea">
                    <table id="entityListtea" lay-filter="entityList" class="cy-list-table"></table>
                </div>
            </div>
        </form>

        <div class="layui-form-item ">
            <div class="layui-input-block" style="margin-left: 0px !important;text-align: center; margin-top: 30px !important;">
                <button type="button" id="cancel" class="layui-btn layui-btn-primary wxyy-tab-btn">取消</button>

            </div>
        </div>
    </div>
</div>
</div>
<!--操作-->
<script type="text/html" id="kcNum">
    <div>1<i class="iconfont color-blue FS20 fr">&#xe68a;</i></div>
</script>
<script type="text/html" id="zwhNum">
    <div>2<i class="iconfont color-blue FS20 fr">&#xe68a;</i></div>
</script>
<script src="${s.base}/lib/layui/layui.js" type="text/javascript" charset="utf-8"></script>
<script src="${s.base}/js/common.js" type="text/javascript" charset="utf-8"></script>
<script>
    var tableIns = null;
    var applyId = '${applyId}';
    var ksId = '${ksId}';
    var url="";
    var cols =[];
    var url1="";
    var cols1 =[];
    var jkNames ="";
    var xkNames ="";
    var menuId='${parentMenuId}';

    layui.use(['jquery', 'table', 'page', 'dialog', "baseutil"], function () {
        var $ = layui.jquery,
            table = layui.table,
            dialog = layui.dialog;
        page = layui.page;
        baseutil = layui.baseutil;
        baseutil.post('/work/kwmanagement/kwmanagement/addOrUpdateStop', {"step": "5", "id": ksId}, function (result) {
            if (0 == result.code) {
            }
        });

        //获取获取学生考场分配的情况

        url = "/work/kwmanagement/kwstudentmessage/pageNew?ksId=" + ksId+"&applyId="+applyId;
        cols = [
            {field: 'title', title: '序号', align: 'left', width: 80, type: 'numbers'},
            {field: 'examNum', title: '准考证号', align: 'center'},
            {field: 'name', title: '姓名', align: 'center'},
            {field: 'userNumber', title: '学号', align: 'center'},
            {
                field: 'kcNum', title: '考场号', align: 'center', templet: function (d) {
                return '<div>' + d.kcNum + '</div>';
            }
            },
            {
                field: 'seatNum', title: '座位号', align: 'center', templet: function (d) {
                return '<div>' + d.seatNum + '</div>';
            }
            },
            {field: 'stSeatNum', title: '考场座位', align: 'center'},
            {field: 'kcPlace', title: '考场地点', align: 'center'}
        ];

        tableIns = page.newInitDate("entityList", cols, url);


        jkNames =  $("#jkNames").val();
        xkNames =  $("#xkNames").val();

        url1 = "/work/kwmanagement/kwteachermessage/findVoPage?ksId=" + ksId+"&applyId="+applyId+"&jkName="+jkNames+"&xkName="+xkNames;
        cols1 = [
            {field: 'title', title: '序号', align: 'left', width: 80, type: 'numbers'},
            {field: 'kmmc', title: '科目', align: 'center'},
            {field: 'beginTime', title: '开始时间', align: 'center'},
            {field: 'endTime', title: '结束时间', align: 'center'},
            {field: 'kcNum', title: '考场号', align: 'center'},
            {field: 'kcStu', title: '考场人数', align: 'center'},
            {field: 'kcPlace', title: '考场地点', align: 'center'},
            {field: 'jkName', title: '监考老师', align: 'center'},
            {field: 'xkName', title: '巡考老师', align: 'center'},

        ];
        tableIns = page.newInitDate("entityListtea", cols1, url1);
        $(".layui-table-box").css("height", $(".layui-table-box").css("height"));

        $(".tab-menu-nav ul li").click(function () {
            $(".tab-menu-nav ul li").removeClass("checked");
            $(this).addClass("checked");
            $("#xktot").hide();
            $("#jktot").hide();
            $("#kstot").hide();
            var idname = $(this).attr("data-id");
            $("#" + idname).show();
        })

        //取消
        $("#cancel").click(function () {
            parent.tabDelete('kwStudentMessageListEdit');

        });
        //导出老师
        $("#addteaBtn").on("click",function () {
            window.location.href = "/work/kwmanagement/kwteachermessage/exportTeacher?applyId="+applyId+"&ksId="+ksId;
        });

        //导出学生
        $("#addstuBtn").on("click",function () {
            window.location.href = "/work/kwmanagement/kwstudentmessage/exportStudnetStri?applyId="+applyId+"&ksId="+ksId;
        });
        $("#teaSearch").on("click",function () {
            jkNames =  $("#jkNames").val();
            xkNames =  $("#xkNames").val();
            url1 = "/work/kwmanagement/kwteachermessage/findVoPage?ksId=" + ksId+"&applyId="+applyId+"&jkName="+jkNames+"&xkName="+xkNames;
            tableIns = page.newInitDate("entityListtea", cols1, url1);
        });
        $("#teareset").on("click",function () {
            $("#jkNames").val("");
            $("#xkNames").val("");
        });




    });
</script>
</body>
</html>